#ifndef _INFOBLOCK_H
#define _INFOBLOCK_H

// Defines for use in the InfoBlock
#define TGT_APP_INFOBLOCK_LENGTH    7

#if (PCB_A1 <= PCB_VERSION && PCB_VERSION < PCB_A2)
    #define TGT_MCU_CODE            0x58  // Code for this MCU partnumber
#elif (PCB_VERSION == PCB_A2)
    #define TGT_MCU_CODE            0x59  // Code for this MCU partnumber
#endif

#define TGT_BL_TYPE                 0x01  // UART BL
#define TGT_FLASH_PAGE_SIZE_CODE    9     // Flash Page Size Code: 2^9 => 512 bytes

// 产品版本说明
//  0.1x    生产调试版本, PCB A1
//  0.2x    生产调试版本, PCB A2
//  1.x     正式产品版本, PCB A1
//  2.x     正式产品版本, PCB A2

#define VER_HI_A1_DEBUG             0
#define VER_LO_A1_DEBUG             10

#define VER_HI_A2_DEBUG             0
#define VER_LO_A2_DEBUG             20

#define VER_HI_A1                   1
#define VER_LO_A1                   2

#define VER_HI_A2                   2
#define VER_LO_A2                   0

#ifdef PRODUCT_DEBUG
    #if (PCB_A1 <= PCB_VERSION && PCB_VERSION < PCB_A2)
        #define APP_FW_VERSION_HIGH VER_HI_A1_DEBUG
        #define APP_FW_VERSION_LOW  VER_LO_A1_DEBUG
    #elif (PCB_VERSION == PCB_A2)
        #define APP_FW_VERSION_HIGH VER_HI_A2_DEBUG
        #define APP_FW_VERSION_LOW  VER_LO_A2_DEBUG
    #endif//PCB_VERSION
#elif (PCB_A1 <= PCB_VERSION && PCB_VERSION < PCB_A2)
    #define APP_FW_VERSION_HIGH     VER_HI_A1
    #define APP_FW_VERSION_LOW      VER_LO_A1
#elif (PCB_VERSION == PCB_A2)
    #define APP_FW_VERSION_HIGH     VER_HI_A2
    #define APP_FW_VERSION_LOW      VER_LO_A2
#endif//PRODUCT_DEBUG

#define BL_SPECIFIC_BYTE            0x25

// Signature Bytes
#define SIG_BYTE0                   0x3D
#define SIG_BYTE1                   0xC2
#define SIG_BYTE2                   0xA5
#define SIG_BYTE3                   0x1B

#endif//_INFOBLOCK_H
